{capture name="hidden"}
		<input name="admin" type="hidden" value="1">
		<input name="body" type="hidden" value="{$smarty.session.body}">
		<input name="mod" type="hidden" value="off">
		<input name="act" type="hidden" value="set_off_depend">
		<input name="lang" type="hidden" value="{$smarty.session.lang}">
		<input name="parent" type="hidden" value="{$smarty.get.group_id}">
		<input name="module" type="hidden" value="realstate">
		<input name="type" type="hidden" value="{$smarty.get.type}">
{/capture}	
{capture name="fields"}
{ext->class_function class="realstate" func="get_all_discounts" assign="discounts"}
{ext->class_function class="realstate" func="get_assigned_discount" type=$smarty.get.type parent=$smarty.get.group_id assign="off"}		
{ext->class_function class="realstate" func="get_assigned_discount_adv" type=$smarty.get.type parent=$smarty.get.group_id assign="off_adv"}		
{*debug var=$off_adv*}
{*debug var=$off*}
<!-- * -->
<table width="100%" cellpadding="0" cellspacing="0">
	<tr>
		<td height="200" valign="middle">		
		<table width="100%" cellpadding="3" cellspacing="0">
			<tr>
				<td width="35%" height="1"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
				<td><img src="client/img/spacer.gif" class="spacer" alt="" /></td>					
			</tr>
			{if $smarty.get.type && $smarty.get.type=="realstate_group"}
			<tr>
				<td>{t t='Kliento'}</td>
				<td><input type="checkbox" name="off_type[client]" {if !$off_adv.off4}checked{/if}>- {t t='taikyti kliento nuolaidą'}</td>
			</tr>		
			<tr>
				<td>{t t='Privaloma'}</td>
				<td><input type="checkbox" name="off_type[global]" {if !$off_adv.off3}checked{/if}>- {t t='taikyti privalomą nuolaidą'}</td>
			</tr>	
			<tr>
				<td>{t t='Pasirenkama'}</td>
				<td><input type="checkbox" name="off_type[select]" {if !$off_adv.off2}checked{/if}>- {t t='taikyti pasirenkamą nuolaidą'}</td>
			</tr>
			{/if}
			<tr>
				<td height="15"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
				<td><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
			</tr>
			<tr>
				<td>{t t='Individuali'}</td>
				<td>				
				{capture name='options'}
					{counter start=0 skip=1 assign="ct"}
					{foreach from=$discounts.indivi item="el"}
						{counter assign="ct"}
						<option value="{$el.id}" {if $el.id==$off.id} selected{/if}>{$el.name}</option>										
					{/foreach}
				{/capture}	
				{if $ct>0}
				<select name="off_type[indivi]" style="width:200px">				
					<option value="0" {if !$el.id} selected{/if}>{t t='Nuolaida netaikoma'}</option>
					{$smarty.capture.options}
				</select>	
				{else}
					{t t='Nėra nei vienos nuolaidos'}		
				{/if}				
				</td>
			</tr>				
		</table>	
		</td>
	</tr>
</table>
<!-- /* -->
{/capture}